<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>登陆</title>
	<style>
		#form-wrap {
			width: 30%;
			margin: 20px auto;
		}

		button,
		select,
		input {
			padding: 10px 20px;
			width: 100%;
			box-sizing: border-box;
			border: 1px solid #ccc;
		}

		.input-wrap {
			margin-bottom: 20px;
		}

		.input-wrap:after {
			content: ' ';
			clear: both;
			display: block;
		}

		.left {
			padding-top: 10px;
			float: left;
			width: 20%;
		}

		.right {
			float: left;
			width: 80%;
		}
	</style>
</head>

<body>
	<div id="form-wrap">
		<form id="form" action="/login/login">
			<div class="input-wrap">
				<div class="left">证件类型:</div>
				<div class="right">
					<input type="text" placeholder="证件类型" id="zjlx" name="zjlx" value="01">
				</div>
			</div>
			<div class="input-wrap">
				<div class="left">身份证号:</div>
				<div class="right">
					<input type="text" placeholder="身份证号" id="username" name="username" value="210104197801153114">
				</div>
			</div>
			<div class='input-wrap'>
				<div class="left">姓名：</div>
				<div class="right">
					<input type="text" placeholder="姓名" id="xm" name="userpwd" value="德圣辉">
				</div>
			</div>
			<div class='input-wrap'>
				<div class="left">联系电话：</div>
				<div class="right">
					<input type="text" placeholder="联系电话" id="lxdh" name="lxdh" value="13998889648">
				</div>
			</div>
			<button type="button" id="btnLogin">登陆</button>
		</form>
	</div>
	<script src="./common/js/jquery.js"></script>
	<script>
		$(function () {
			sessionStorage.removeItem('jbxx');
			sessionStorage.removeItem('lxdh');
			sessionStorage.removeItem('zjbh');
			$('#btnLogin').click(function (event) {
				event.preventDefault();
				$.ajax({
					type: 'post',
					url: '/login/login',
					data: JSON.stringify({
						zjlx: $('#zjlx').val(),
						sfzhm: $('#username').val(),
						userid: '123',
						xm: $('#xm').val(),
						lxdh: $('#lxdh').val()
					})
				}).done(function (result) {
					if (result.returnCode == '1') {
						window.location.href = './index.html';
					}
				});
			});
		});
	</script>
</body>

</html>
